package com.etc.entity;

public class Product {
		public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public double getPrice() {
		return price;
	}
	public void setPrice(double price) {
		this.price = price;
	}
	@Override
	public String toString() {
		return "Product [name=" + name + ", price=" + price + ", number=" + number + ", total=" + total + "]";
	}
	public int getNumber() {
		return number;
	}
	public void setNumber(int number) {
		this.number = number;
	}
	public double getTotal() {
		return number*price;
	}
	public void setTotal(double total) {
		this.total = total;
	}
		public Product(String name, double price, int number) {
		super();
		this.name = name;
		this.price = price;
		this.number = number;
		this.total = getTotal();
	}
		String name;
		double price;
		int number;
		double total;
}
